<?php
global $_GPC, $_W;
$GLOBALS['frames'] = $this->getMainMenu();
$data[':uniacid']=$_W['uniacid'];
$where = ' where uniacid=:uniacid';
if($_GPC['time']){
    $start=strtotime($_GPC['time']['start']);
    $end = strtotime($_GPC['time']['end']);
    $where.=" and create_time >={$start} and create_time <={$end}";
}
$pageindex = max(1, intval($_GPC['page']));
$pagesize=10;
$sql="select *  from " . tablename("cjdc_admin_log") .$where." order by create_time DESC";
//var_dump($sql);die;
$select_sql =$sql." LIMIT " .($pageindex - 1) * $pagesize.",".$pagesize;
$list = pdo_fetchall($select_sql,$data);
if(!empty($list)){
    foreach ($list as $key=>$value){
        $list[$key]['create_time'] = date('Y-m-d H:i',$value['create_time']);
    }
}
$total=pdo_fetchcolumn("select count(*) from " . tablename("cjdc_admin_log") .$where,$data);
$pager = pagination($total, $pageindex, $pagesize);
include $this->template('web/adminlog');